/**
 * 通用配置的可编辑表格面板
 */
$import("config");
$import("config.ColumnModel");

config.EditGridPanel = function(cfg) {
	if (! cfg) cfg = {};
	cfg.anchor = '0 -180';
	cfg.cm = new config.ColumnModel({tableConfig: cfg.tableConfig});
	cfg.store = new Ext.data.ArrayStore({
    	autoDestroy: true,
        storeId: 'myStore',
        idIndex: 0,
    	fields : ["id", "name", "sex", "jobAge", "school", "profession", "phoneCode", "birthDate"],
    	data : [
             [1, 'fdasfd', true, 10, '西太平洋', '电脑学', '0592-3507401', new Date()],
             [2, 'fdasfd', true, 10, '西太平洋', '电脑学', '0592-3507401', new Date()]
    	]
    });
	// 配置为行编辑器
	 var editor = new Ext.ux.grid.RowEditor({
	        saveText: '保 存',
	        cancelText: '取 消'
	 });
	 cfg.plugins = [editor];

	
	config.EditGridPanel.superclass.constructor.call(this, cfg);
}
Ext.extend(config.EditGridPanel, Ext.grid.GridPanel, {
	
});


